<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Data-Table 表格</title>
    <link rel="stylesheet" href="../../frame/layui/css/layui.css">
    <link rel="stylesheet" href="../../frame/static/css/style.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../ditor/styles/simditor.css">

</head>
<body class="body">
<!-- 工具集 -->
<div class="my-btn-box">
    <span class="fl">
        <a class="layui-btn btn-add btn-default" id="btn-refresh" onclick="location.reload()"><i class="layui-icon">&#x1002;</i></a>
    </span>
</div>
<!-- 表格 -->
<div class="dateTable">
    <textarea id="editor"  autofocus></textarea>
    <div style="float: left">
        <a class="layui-btn mgl-20" style="margin-top: 10px" onclick="$('#inputId').click()">图片链接获取</a>
        <input type="file" name="img" id="inputId" onchange="imgPut('inputId','putImg','shoImg','admin/BannerFile')" hidden>
        <input id="putImg" style="padding: 10px;border: 1px solid #9ba5a9;position: relative;top: 6px" />

    </div>
    <img id="shoImg" style="width: 100px;margin-top: 10px;margin-left: 20px">
    <a class="layui-btn mgl-20" id="put" style="margin-top: 10px;float: right">提交</a>
</div>
<script src="../../js/public/jquery-3.1.1.min.js"></script>
<script src="../../js/layer/layer.js"></script>
<script src="../../js/public/common.js"></script>
<script type="text/javascript" src="../../ditor/scripts/module.js"></script>
<script type="text/javascript" src="../../ditor/scripts/hotkeys.js"></script>
<script type="text/javascript" src="../../ditor/scripts/uploader.js"></script>
<script type="text/javascript" src="../../ditor/scripts/simditor.js"></script>
<script>

    var editor = new Simditor({
        textarea: $('#editor')
        //optional options
    });

    $(function(){
        let content = AjaxForm('admin/FuWenBenContent?id=19');
        $('.simditor-body').html(content);

        $('#put').click(function(){
            let data= $('#editor').val();
            let id = 19;
            let ref =  AjaxForm('admin/commonset','post',{id:id,content:data},2);         	
          	if(ref == 1)lay('操作成功');
        })
    })

</script>
</body>
</html>